<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>西海良品</title>
<meta name="viewport" content="initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<link rel="stylesheet" href="/style/wei/css/base.css">
<link rel="stylesheet" href="/style/wei/css/swiper.min.css"/>
<link rel="stylesheet" href="/style/wei/css/xshop.css?ver=20190812" />
<link rel="stylesheet" href="/style/wei/mui/css/mui.min.css"/>
<script src="/style/wei/js/swiper.min.js"></script>
<script src="/style/wei/js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="/style/wei/js/xShop.js" type="text/javascript" charset="utf-8"></script>
<script src="/style/wei/mui/js/mui.min.js"></script>
<script type="text/javascript" src="/style/wei/js/jquery.cookies.js"></script>
<script type="text/javascript" src="/style/new/js/jquery.lazyload.js"></script>
<style>
.foot-menu ul{ height: 1rem;line-height: 1rem; }
.syList{ display: flex;align-items: center; }
.syList-left{ margin-right: 0.16rem;display: flex;align-items: flex-end;float: left; }
.syList-left i{ font-size: 0.22rem;color: #f75015;margin-bottom: 0.01rem }
.syList-left i.gray{color: #333; font-size: .25rem; padding-left: .2rem;}
.syList-left em{ color: #f75015;font-size: 0.32rem; }
.syList-center{ font-size: 0.22rem;color: #999;text-decoration: line-through;float: left; }
.syList-right{ background: #da251e;/*width: 1.82rem;*/height: 0.50rem; float: right;border-radius: 0.3rem;padding: 0 0.20rem;display: flex;justify-content: space-between;align-items: center;overflow: hidden;}
.syList-right img{ width: 0.33rem;height: 0.32rem; }
.syList-right i{ font-size: 0.20rem;color: #fff;    border-left: 2px solid#dd3a34;padding: 0.05rem 0 0.05rem 0.1rem;margin-left: 0.1rem; }
.sy-flex{ display: flex;align-items: center;justify-content: space-between;    padding: 0 0.27rem;}
.theme-popover { background: #FFFFFF; position: absolute; position: fixed; width: 100%; height: 100%; top: 0; left: 0;background: rgba(0, 0, 0, .6);z-index: 100000;display: none;}
.theme-buy { position: fixed; width: 100%; z-index: 4;}
.theme-buy img{  border-bottom: 1px solid #f2f2f2;}
.theme-popbod { text-align: center;color: #fff;}
.theme-popbod p { display: block; width: 100%; text-align: center; font-size: .3rem; line-height: 30px; margin-bottom: 40px; color: #fff;}
.theme-poptit p { display: block; -webkit-margin-before: 1em; -webkit-margin-after: 1em; -webkit-margin-start: 0px; -webkit-margin-end: 0px;}
.theme-popbod img { padding-top: 50%;text-align: center;}
.theme-buy {padding-top: .81rem;width: 100%;}
.theme-buy img { width: 100%;}
.theme-poptit { display: block; text-align: center;}
.theme-poptit p { color: #fff; font-size: 1.5rem;}
#nav { width:80%;  height: 40px;  position:fixed; left:20%;top:4rem; background-color:#0066FF ; text-align: center;border-radius: 50px 50px 50px 50px;z-index: 999999;display: none;}
#nav span{ font-size:14px; color:#fff }
#nav img{ display: block; width:40px; height:40x; border-radius:100%; overflow: hidden;}
.sy-title{ background: #fff;padding-top: 0.38rem;width: 100%; }
.sy-title-left{ display: flex;align-items: flex-end;justify-content: center;padding-bottom: 0.1rem; }
.sy-title-left i{ width: 0.30rem;height: 0.03rem;background: #e7716d;margin-bottom: 0.1rem; }
.sy-title-left b{ font-size: 0.42rem;color: #da251e; padding: 0 0.10rem; }
.sy-title-right{ font-size: 0.16rem;color: #999;text-align: center;padding-bottom: 0.12rem  ;height: 0.18rem;line-height: 0.18rem; }
/*客服*/
.content-bg{ background: url("/style/lh/images/sy-bg.png") no-repeat;width: 100%;height: 5.51rem;background-size: 100% 100%;    position: relative; }
.content-bg h3{ font-size: 0.41rem;color: #da251e;text-align: center;font-weight: bold;padding: 0.45rem 0 0.15rem; }
.content-bg h4{ font-size: 0.18rem;color: #666;text-align: center; }
.content-bg h5{ width: 0.40rem;height: 0.05rem;background: #da251e;margin: 0.12rem auto 0;  }
.content-bottom{ margin-bottom: 0.8rem;background: #fff; }
.content-view{  }
.content-titile{ padding: 0.05rem 0;background: #da251e;overflow: hidden;}
.content-titile h3{ text-align: center;color: #fff;font-size: 0.26rem;padding: 0.10rem 0;border-bottom: 0.02rem dashed #fff;border-top: 0.02rem dashed #fff;    font-style: initial;margin: 0; }
.content-bottom dl dt{ width: 1.46rem;/*height: 0.43rem;*/background: #ee9c99;text-align: center;/*line-height: 0.43rem;*/color: #fff;font-size: 0.21rem;margin: 0.46rem auto 0.33rem; font-style: initial;display: flex;justify-content: center;align-items: center; }
.content-bottom dl dd{font-size: 0.21rem;height: 0.21rem;color: #222;text-align: center;margin-bottom: 0.28rem;font-style: initial;line-height: 0.21rem;}
.content-bottom dl dd:first-child{ margin-bottom: 0;}
.content-bottom dl dd:last-child{padding-bottom: 0.8rem;}
.content-view-top{ margin-top: 0.58rem;overflow: hidden; }
.sy-h6{ color: #333333;font-size: 0.25rem;font-style: initial;}
.sy-h2{color: #da251e;font-size: 0.28rem;font-weight: bold;}
.sy-h2:link{color: #da251e;  }
.sy-h2:visited{color: #da251e;  }
.sy-h2:hover{color: #da251e;  }
.sy-h2:active{color: #da251e;  }
.sy-list-img{ width: 100%;height: 0.42rem;    position: absolute;bottom: 0.50rem;}
.content-main img{ width: 0.33rem;height: 0.28rem;float: left;margin-right: 0.12rem; }
.content-main{width: 3rem;float: right;margin-right: 1rem;display: flex;align-items: center;margin-bottom: 0.40rem;}
.content-main-right{border-left: 0.01rem solid#d7d4d4;width: 2.3rem;padding-left: 0.14rem;float: left;}
.jplist{display: flex;align-items: center;width:100%;float: left;}
.jplist i{color: #333; font-size: .25rem; padding-left: .2rem;}
</style>
</head>
<body>
<div class="outwrap">
	<div class="meinner-adr-add HomePage">
		<!--banner图-->
		<div class="swiper-container" id="a_top">
			<div class="swiper-wrapper">
			<!-- <div class="swiper-slide"><a href="<?//= $r['url']?>"><img src='/style/lh/images/a5.jpg' alt="" /></a></div> -->
				<?php
			if($this->data['advList1'])
			{
				foreach($this->data['advList1'] as $k=> $r){										
																
			?>
				<div class="swiper-slide"><a href="<?= $r['url']?>"><img src='<?= $r['pic']?>' alt="" /></a></div>
			      <?php
 		}}
            ?>	
			</div>
			<!-- 分页器，点点 -->
			<div class="swiper-pagination"></div>
		</div>
		<!--头条-->
		<div class="toutiao">
			<span class="toutiao-name"><img src="/style/lh/images/sy2.png" style="width:1.5rem;"></span>
			<a href="<?=$this->data['advList5']['url'] ?>">
				<marquee direction="left" scrollamount="3" scrolldelay="1" class="toutiao-main">
					<span><?=$this->data['advList5']['title'] ?></span>
				</marquee>
			</a>			
		</div>		
		<!--超值热卖-->
	<div class="hot-sale">
		<div class="sy-title">
            <div class="sy-title-left">
                <i></i>
                <b>爆款热卖</b>
                <i></i>
            </div>
            <div class="sy-title-right" style="padding-bottom: 0">HOT&nbsp;&nbsp;PRODUCT</div>
        </div>
		 <?php
		 	if($this->data['advList3'])
			{
				foreach($this->data['advList3'] as $k=> $r){	 								
				    

				    $goods = $this->data['goods'][$r['goods_id']];
			?>
			
	        <div class="hot-sale-main">
	    		<a href="/index/goodsdetail?goods_id=<?=$r['goods_id']?>" >
		    		<div class="hot-sale-main-pic">
		    			<!-- lazycover.jpg -->
		    			<!-- <img src="/style/lh/images/sy6.png" class="sy6"> -->
		    			<img src="/style/images/lazycover.jpg" class="lazyimg" data-original="<?= $r['pic']?>" />
		    		</div>
		    	
		    		    <div class="sy-flex">
		    		    	<div style="width: 4.5rem;">
		    		   		<h4 style=" color: #333;font-size: .3rem;width: 100%;line-height: .44rem;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;"><?= $r['title']?></h4>
	                            <div class="syList">
	                                <div class="syList-left">
	                                    <i>￥</i>
	                                    <em><?=$goods['shop_price']?></em>
	                                    <i class="gray"><?php
	                                     // / 返100, 券7
	                                     if($goods['price_me'] >0 || $goods['coupon_price']>0)
	                                     {
	                                     	echo '/ ';
	                                     	if($goods['price_me'] >0)
	                                     	{
	                                     		echo '返'.($goods['price_me'] * 1);
	                                     	}
	                                     	if($goods['coupon_price'] >0)
	                                     	{
	                                     		echo ',抵券'.$goods['coupon_price'];
	                                     	}
	                                     }
	                                    ?></i>	                                    
	                                </div>	                                
	                            </div>
		    		    	</div>
                            <div class="syList-right">
                                <img src="/style/lh/images/sy4.png" alt="">
                                <i >立即购买</i>
                            </div>
                       </div>
	    		</a>
		    </div>
		    
		       <?php
 		 }} 
            ?>
		</div>
         		<!--猜你喜欢-->
		<div class="miaosha">
			<div class="sy-title" style="margin-bottom: 0.2rem">
	            <div class="sy-title-left">
	                <i></i>
	                <b>精品展示</b>
	                <i></i>
	            </div>
	            <div class="sy-title-right">PRODUCT&nbsp;&nbsp;DISPLAY</div>
	        </div>

			<div class="xihuan-bot">
				<ul id="lives">
			<?php
			if($this->data['goodsList'])
			{
				foreach($this->data['goodsList'] as $k=> $val){										
																
			?>
			
			 <li class="xihuan-bot-each">
				<?php
				if($val['goods_number']==0)
				{
					echo '<div class="nostock_list">补货中</div>';
				}
				?>				
				<a href="/index/goodsdetail?goods_id=<?=$val['goods_id']?>" >
					<div class="xihuan-bot-each-pic">
						<img src="/style/images/lazycover.jpg" class="lazyimg" data-original="<?=$val['thumb_docid']?>" />
					</div>
					<div style="padding: 0.15rem;">
						<h2 class="xihuan-bot-each-title"><?= $val['goods_name'] ?></h2>
						<div class="xihuan-bot-each-money" style="display: flex;justify-content: space-between;align-items: center;">
	                        <div class="jplist">
	                            <p style=" float:left;color:#fc671a;" class="xihuan-bot-each-money-left">
	                            	
	                            	<?php
	                            	if($val['shop_price']>0)
	                            	{
	                            		echo '￥'.$val['shop_price'];
	                            	}
	                            	elseif($val['ximi_price']>0)
	                            	{
	                            		echo ($val['ximi_price'] * 1).'硒米';
	                            	}
	                            	?>
	                            </p>
	                            <i><?php
	                                     // / 返100, 券7
	                                     if($val['price_me'] >0 || $val['coupon_price']>0)
	                                     {
	                                     	echo '/ ';
	                                     	if($val['price_me'] >0)
	                                     	{
	                                     		echo '返'.($val['price_me'] * 1);
	                                     	}
	                                     	if($val['coupon_price'] >0)
	                                     	{
	                                     		echo ',抵券'.$val['coupon_price'];
	                                     	}
	                                     }
	                                    ?></i>
	                        </div>	                        
	                    </div>
					</div>
				</a>
			</li>
				    
		    <?php
 				}
 			}
            ?>	
				</ul>
			</div>
		</div>
		  <div class="content">
	        <div class="content-bg">
	            <h3>专业客服 竭诚为您服务</h3>
	            <h4>如有任何问题，欢迎拨打服务热线咨询！</h4>
	            <!-- <h5></h5> -->
	            <div class="content-view">
	                <div class="content-view-top">
	                    <div class="content-main">
	                        <img src="/style/lh/images/sylist1.png" alt="">
	                        <div class="content-main-right">
	                            <h6 class="sy-h6">全国服务热线</h6>
	                            <a href="tel:0898-65520365" class="sy-h2">0898-65520365</a>
	                        </div>
	                    </div>
	                    <div class="content-main">
	                        <img src="/style/lh/images/sylist2.png" alt="">
	                        <div class="content-main-right">
	                            <h6 class="sy-h6">官方客服微信 </h6>
	                            <a href="tel:19989077388" class="sy-h2">199-8907-7388</a>
	                        </div>
	                    </div>
	                </div>
	                <img src="/style/lh/images/sy-list.png" alt="" class="sy-list-img">
	            </div>
	        </div>
	        <div class="content-bottom">
	            <div class="content-titile">
	                <h3>售后服务</h3>
	            </div>
	            <dl>
	                <dt>签收须知</dt>
	                <dd>如果产品严重破损，请拒收</dd>
	                <dt>退货须知</dt>
	                <dd>产品没有拆开，不影响二次销售的情况下</dd>
	                <dd>客户签收商品后7日内无条件退货</dd>
	                <dd>非质量问题退货，需要承担发货和退货产生的快递费用</dd>
	                <dd>系统确定收货后，非质量原因概不办理退款退货</dd>
	                <dd>如因质量问题退货，请拍照联系客服。</dd>
	            </dl>
	        </div>
    	</div>
    </div>
</div>
</a>
</div>

<!--底部导航-->
<div class="foot-menu">
    <ul class="clearfix">
    	<a href="/">
	        <li class="on">
	        	<i class="ico-7"></i>
	        	<span>首页</span>
	        </li>
        </a>
        <a href="/rcm">
        	<li>
        		<i class="ico-1"></i>
        		<span>商城</span>	
        	</li>
        </a>
        <a href="/cart/cart">
	        <li>
	        	<i class="ico-5"></i>
	        	<span>购物车</span>
	        	
	        </li> 
        </a>           
        <a href="/college">
	        <li>
	        	<i class="ico-8"></i>
	        	<span>商学院</span>
	        	
	        </li> 
        </a>  
        <a href="/user/index">     
	        <li>
	        	<i class="ico-4"></i>
	        	<span>我的</span>        	
	        </li>
        </a>		
    </ul>
</div>
<script>
var swiper = new Swiper('.swiper-container', {
    // 如果需要分页器
    pagination: '.swiper-pagination',
    
	// 如果需要前进后退按钮
    nextButton: '.swiper-button-next',
    prevButton: '.swiper-button-prev',
    
    // paginationClickable: '.swiper-pagination',  // paginationClickable: '.swiper-pagination'是控制到最底或最早，不能从最后一个到第一个这样循环

    slidesPerView: 1,
    paginationClickable: true, //paginationClickable: true,可以实现从最后一个到第一个这样循环
    spaceBetween: 30,
    	loop: true,
    	autoplay: 2000,
    	autoplayDisableOnInteraction: false
});
//回到顶部
function goTop(){
	$('html,body').animate({'scrollTop':0},600);
}
   
var _cookie_home_name = 'HOME_SCROLLTOP';
var _g_status = 0;
$(document).ready(function(e){
	
	/*位置记录*/    
	$(".meinner-adr-add").on("scroll",function(){	
		$.cookie(_cookie_home_name, $(".meinner-adr-add").scrollTop(),{ path: '/' });

		if($(".meinner-adr-add").scrollTop() > 400)
		{
			if(_g_status ==0)
			{
				_g_status = 1;
				$(".hongbao-fixd").fadeIn();
			}
			
		}
		else
		{
			if(_g_status ==1)
			{
				_g_status = 0;
				$(".hongbao-fixd").fadeOut();
			}
		}

	});  

	var _cookie_home_scrolltop=   $.cookie(_cookie_home_name);
	if(_cookie_home_scrolltop != null){
   		$( ".meinner-adr-add" ).scrollTop(parseInt(_cookie_home_scrolltop));
	} 

	/*清除其他页面位置COOKIE*/
    /*$.cookie("CATE_PAGE_NAME", 1 ,{ path: '/' } );
    $.cookie("CATE_PAGE_SCROLLTOP", 0 ,{ path: '/' } );*/
    $.cookie("CATE_GOODS_LIST_SCROLLTOP", 0 ,{ path: '/' } );
    $.cookie('ORDER_TYPE', '' ,{ path: '/' } );
	$.cookie('ORDER_PAGE', '' ,{ path: '/' } );
 	/*搜索*/
	 
	$('.br-search').click(function(){
		$(".fenlei-search").show();
		$("#querystr").focus();
	});
/* 	$('.fenlei-search-right').click(function(){
		$('.fenlei-search').hide();
	});
	 */
	/*懒加载*/
	$(".lazyimg").lazyload({
      container:".meinner-adr-add",  
      threshold : 150,
      placeholder : "/style/images/lazycover.jpg",
      failurelimit : 4
    });
})


function _gotoTop()
{
	$( ".meinner-adr-add" ).scrollTop(0);
	$(".hongbao-fixd").fadeOut();
	_g_status = 0;
}
$("#_search").click(function(){
	  $.cookie('ORDER_TYPE', '' ,{ path: '/' } );
	   $.cookie('ORDER_PAGE', '' ,{ path: '/' } );
	   $("#forms").submit();    	
	   	
})

  $('#forms').submit(function(){
	
	   $.cookie('ORDER_TYPE', '' ,{ path: '/' } );
	   $.cookie('ORDER_PAGE', '' ,{ path: '/' } );
});

 
	  
	   	
	
$('.theme-buy').click(function(){
	$('.theme-popover').show();
})  
   $('.theme-poptit').click(function(){
		$('.theme-popover').hide();
	   })

</script>

<?php
if($this->JSAPI){
?>
<script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
<script>
wx.config({
  appId: '<?=$this->JSAPI['appId'];?>',
  timestamp: '<?=$this->JSAPI['timestamp'];?>',
  nonceStr: '<?=$this->JSAPI['nonceStr'];?>',
  signature: '<?=$this->JSAPI['signature'];?>',
  jsApiList: [
    'onMenuShareTimeline', //分享到朋友圈
    'onMenuShareAppMessage' //分享给朋友
  ]
});
wx.checkJsApi({
    jsApiList: ['onMenuShareTimeline','onMenuShareAppMessage'], // 需要检测的JS接口列表，所有JS接口列表见附录2,
    success: function(res) {
    // 以键值对的形式返回，可用的api值true，不可用为false
    // 如：{"checkResult":{"chooseImage":true},"errMsg":"checkJsApi:ok"}
    // alert(res);
    }
});
wx.ready(function () {
	wx.onMenuShareAppMessage({
		title: '西海良品',
		desc: '绿色富硒、好吃不贵的优质农产品，自用省钱、分享返钱，共建共享。社区连锁店 欢迎加盟.....',
		link: '<?=$this->JSAPI['url'];?>',
		imgUrl: 'http://<?=$_SERVER['HTTP_HOST'];?>/style/wei/images/tuijian/tj_logo_big2.jpg',
		type: 'link',
		dataUrl: '',
		success: function () {
		// 用户确认分享后执行的回调函数
		},
		cancel: function () {
		// 用户取消分享后执行的回调函数
		}
	});
  
  	// 分享到朋友圈
  	wx.onMenuShareTimeline({
	    title: '西海良品', // 分享标题
	    link: '<?=$this->JSAPI['url'];?>',
	    imgUrl: 'http://<?=$_SERVER['HTTP_HOST'];?>/style/wei/images/tuijian/tj_logo_big2.jpg',
	    success: function () {
	    // 用户确认分享后执行的回调函数
		},
		cancel: function () {
	    // 用户取消分享后执行的回调函数
	    }
	});  

});
</script>
<?
}
?>
</body>
</html>